<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>
  	<s:if test="id eq null">
	增加系列、品名
</s:if>
<s:if test="id neq null">
	修改系列、品名
</s:if>
   </title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">    
<link href="${pageContext.request.contextPath}/css/default.css" type="text/css" rel="stylesheet" />
<link href="${pageContext.request.contextPath}/js/validate/jquery.validate.css" type="text/css" rel="stylesheet" />
<script src="${pageContext.request.contextPath}/js/jquery.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/validate/jquery.validate.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/validate/messages_cn.js" type="text/javascript"></script>
<style type="text/css">
	.input{width:150px;}
	select{width:158px;}
	
	table {
		font-size:1.2em;
		color: #4d87ce;
		border:solid 0px green;
		line-height:150%;
	}
	
	td{
		white-space:nowrap;
	}
</style>
<script type="text/javascript">
$(document).ready(function(){
	//聚焦第一个输入框
	$("#value").focus();
	//为inputForm注册validate函数
	$("#inputForm").validate({
		rules: { 
     		value: "required",
     		flag: "required"
		}
	});
});
</script>
</head>
<body>
<s:form id="inputForm" action="series-list!saveOrUpdate" theme="simple">
<table align="center" width="100%">
	<thead>
		<tr>
			<th> 
				&nbsp;
			</th>
			<th align="left"> 
				<s:if test="id eq null">
   					增加系列、品名
   				</s:if>
   				<s:if test="id neq null">
   					修改系列、品名
   				</s:if>
			</th>
		</tr>
	</thead>
	<tr>
		<td align="right" width="40%"> 
			名称：
		</td>
		<td>
			<s:textfield name="value" cssClass="input"/>
		</td>
	</tr>
	<tr>
		<td align="right">
			类型：
		</td>
		<td>			
			<s:select label="类型"
				name="flag"
				headerKey="" headerValue="请选择类型"
				list="#{'1':'系列', '2':'品名'}"
				required="true"/>
		</td>
	</tr>
	<tr height="50px">
		<td>
			&nbsp;&nbsp;&nbsp;
		</td>
		<td>
			<input type="submit" value="提 交"/>
		</td>
	</tr>
</table>
<s:hidden name="id"/>
</s:form>
</body>
</html>
